namespace Sirius.Mapper.Test.TestData
{
    using System.Collections.Generic;
    using Collections;
    using Enities;

    public class MapperTestData
    {
        public static readonly Customer Customer1 = new Customer { Id = 1, FirstName = "Bob", LastName = "Bush", ParentId = null };
        public static readonly Customer Customer2 = new Customer { Id = 2, FirstName = "Franck", LastName = "Lamp", ParentId = 1 };
        public static readonly Customer Customer3 = new Customer { Id = 3, FirstName = "Luisa", LastName = "O'Connor", ParentId = null };

        public static readonly CustomerInfo CustomerInfo1 = new CustomerInfo
                                                                {
                                                                    Id = Customer1.Id,
                                                                    Name = Customer1.FirstName + " " + Customer1.LastName,
                                                                    ParentId = Customer1.ParentId
                                                                };

        public static readonly CustomerInfo CustomerInfo2 = new CustomerInfo
                                                                {
                                                                    Id = Customer2.Id,
                                                                    Name = Customer2.FirstName + " " + Customer2.LastName,
                                                                    ParentId = Customer2.ParentId
                                                                };

        public static readonly CustomerInfo CustomerInfo3 = new CustomerInfo
                                                                {
                                                                    Id = Customer3.Id,
                                                                    Name = Customer3.FirstName + " " + Customer3.LastName,
                                                                    ParentId = Customer3.ParentId
                                                                };

        public static readonly IList<Customer> CustomersList = new List<Customer> { Customer1, Customer2, Customer3 };
        public static readonly IList<CustomerInfo> CustomerInfoList = new List<CustomerInfo> { CustomerInfo1, CustomerInfo2, CustomerInfo3 };

        public static readonly IList<int?> CustomersIdList = new List<int?> { Customer1.Id, Customer2.Id, Customer3.Id };

        public static ITree<Customer> CustomersTree;
        public static ITree<Customer> EmptyCustomersTree;

        public static ITree<CustomerInfo> CustomersInfoTree;

        public static ILookup<int, Customer> CustomersLookup;
        public static ILookup<int, CustomerInfo> CustomersInfoLookup;

        static MapperTestData()
        {
            var customer1Tree = new Tree<Customer>(Customer1) { Customer2 };
            var customer1InfoTree = new Tree<CustomerInfo>(CustomerInfo1) { CustomerInfo2 };

            var customer3Tree = new Tree<Customer>(Customer3);
            var customer3InfoTree = new Tree<CustomerInfo>(CustomerInfo3);

            CustomersTree = new Tree<Customer> { customer1Tree, customer3Tree };
            CustomersInfoTree = new Tree<CustomerInfo> { customer1InfoTree, customer3InfoTree };

            EmptyCustomersTree = new Tree<Customer>(null);

            CustomersLookup = new Lookup<int, Customer>
                                  {
                                      { 1, Customer1 },
                                      { 2, Customer2 },
                                      { 3, Customer3 }
                                  };

            CustomersInfoLookup = new Lookup<int, CustomerInfo>
                                  {
                                      { 1, CustomerInfo1 },
                                      { 2, CustomerInfo2 },
                                      { 3, CustomerInfo3 }
                                  };
        }

        public static IList<Customer> EmptyCustomersList = new List<Customer> { new Customer(), new Customer(), new Customer() };

        public static Task Task1 = new Task { Id = 1, Name = "Task1" };
    }
}